/**
 * This is a tree node class for use within a map.  Thus, it contains
 * a field to store a key and another to store a value.
 *
 * @param <K> the type of the keys; Comparable so ordering can be used
 * @param <V> the type of the values
 * 
 * !!!!! DO NOT MODIFY THIS FILE !!!!!
 */

public class TreeMapNode<K extends Comparable<K>, V>
{
	
	private K key;
	private V value;
	private TreeMapNode<K, V> left, right;
	
	public TreeMapNode(K key, V value)
	{
		this.key = key;
		setValue(value);
		setLeft(left);
		setRight(right);
	}
	
	public K getKey()
	{
		return key;
	}
	
	public void setValue(V value)
	{
		this.value = value;
	}
	
	public V getValue()
	{
		return value;
	}
	
	public void setLeft(TreeMapNode<K, V> left)
	{
		this.left = left;
	}
	
	public void setRight(TreeMapNode<K, V> right)
	{
		this.right = right;
	}
	
	public TreeMapNode<K, V> getLeft()
	{
		return left;
	}
	
	public TreeMapNode<K, V> getRight()
	{
		return right;
	}
	
}
